-
-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The beginning of grabbing Sonarr root folders and approving requests with sepecific root folders #535
Conversation
…ith sepecific root folders
@@ -186,6 +186,37 @@ private Negotiator LoadRequests() | |||
|
|||
} | |||
|
|||
IEnumerable<RootFolderModel> rootFolders = new List<RootFolderModel>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This module is not being used yet just a FYI, there is no code being used in this class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured as much, I just copied what I wrote in the RequestModule.cs :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@onedr0p Ok that's fine :)
Looks good so far! So the caching is not working for you? |
Nope, I hit the button to grab the root folders, click save and reload the page and they are wiped out. I am clueless as to why :/ Also after I added the validation stuff in SonarrSettingsValidator it won't accept you even hitting Save. Sorry my C# is very bad lol |
Hey that's fine. I can take a look tonight to see if I can find out what is going wrong.
Your C# is not bad! You've been able to read and understand what is going on and there is some confusing areas so that's execllent! |
I have a strong Linux background, and I recently started a position as a VB.net web developer and I slowly getting up to par with the Microsoft environment. Thanks for taking a look! |
OK, so just looked at your code, you are storing the root folders into the cache (Default cache expiry is 20 minutes). When we save the sonarr settings Here we are binding the results from the Now So what we need to do is add a new property onto the If you need any help please ask 😄 |
data: $form.serialize(), | ||
url: "sonarrrootfolders", | ||
dataType: "json", | ||
success: function(response) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a bug here where if we keep pressing the Get RootFolders it will keep appending to the list :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that lol, it's not an important fix for right now thou
@@ -80,12 +80,24 @@ | |||
</div> | |||
|
|||
<div class="form-group"> | |||
<div> | |||
<button type="submit" id="getRootFolders" class="btn btn-primary-outline">Get RootFolders <div id="getRootFolderSpinner" /></button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we include a space in RootFolders
so it's Root Folders
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that makes sense :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments
In teh SonarrSettings class I have
The array of paths will also be stored here with the one the user selected? Or should I change it to:
|
Using those new github features I see :P |
Well you need to know the one the user selected right? Ignore my other comment, when saving we need to get it out of the cache and set the one the user picked into the RootFolders property. On the approve page we can just request the root folder from Sonarr again. |
@onedr0p is the pull ready for merge? |
It's not finished yet. I think I'll merge it in and then finish it off :) |
Sorry for the late response, please continue where I left off. |
Here's a brief rundown of what I did and what is left to do.
In the Admin Setting for Sonarr:
What's left to do: